package com.miku.config;

import io.github.briqt.spark4j.SparkClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "miku.ai")
@Data
public class XunFeiConfig {

    private String appid;
    private String apikey;
    private String secretkey;

    @Bean
   public SparkClient sparkClient(){
        SparkClient client = new SparkClient();
        client.appid=appid;
        client.apiKey=apikey;
        client.apiSecret=secretkey;
        return client;
    }
}
